const http=require("http");
const router=require("./router");
const server=http.createServer(function(request,response){
    let path=request.url;
    let fun=router[path];
    let str=fun?router[path]():"<h1 style='color:red;'>404</h1>";
    response.end(str);

});
server.listen(3000);